package com.yt.controller;

import com.yt.service.MessageSend;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.UUID;

@RestController
@Slf4j
public class SendController {

    @Resource
    MessageSend messageSend;

    @GetMapping("/send")
    public String send(){
        String message= UUID.randomUUID().toString();
        messageSend.send(message);
//        log.info(message);
        System.out.println("消息发送："+message);
        return message;
    }

}
